<!doctype html>
<html class="theme-next   use-motion ">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>



<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />












  <link href="/vendors/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css"/>




  <link href="//fonts.googleapis.com/css?family=Lato:300,400,700,400italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">



<link href="/vendors/font-awesome/css/font-awesome.min.css?v=4.4.0" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=0.4.5.2" rel="stylesheet" type="text/css" />


  <meta name="keywords" content="500xp," />








  <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico?v=0.4.5.2" />






<meta name="description" content="500px API500px API provides programmatic access to 500px functionality and content.Version 1 of the API is limited to the essentials of the website’s functionality: viewing feature streams, photo info">
<meta property="og:type" content="article">
<meta property="og:title" content="500px api-readme">
<meta property="og:url" content="https://lechance.github.io/posts/2015/08/19/400px-api-readme/index.html">
<meta property="og:site_name" content="Lechance's Blog">
<meta property="og:description" content="500px API500px API provides programmatic access to 500px functionality and content.Version 1 of the API is limited to the essentials of the website’s functionality: viewing feature streams, photo info">
<meta property="og:updated_time" content="2016-08-04T07:17:41.179Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="500px api-readme">
<meta name="twitter:description" content="500px API500px API provides programmatic access to 500px functionality and content.Version 1 of the API is limited to the essentials of the website’s functionality: viewing feature streams, photo info">



<script type="text/javascript" id="hexo.configuration">
  var CONFIG = {
    scheme: '',
    sidebar: 'hide',
    motion: true
  };
</script>

  <title> 500px api-readme | Lechance's Blog </title>
</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="en">

  <!--[if lte IE 8]>
  <div style=' clear: both; height: 59px; padding:0 0 0 15px; position: relative;margin:0 auto;'>
    <a href="http://windows.microsoft.com/en-US/internet-explorer/products/ie/home?ocid=ie6_countdown_bannercode">
      <img src="http://7u2nvr.com1.z0.glb.clouddn.com/picouterie.jpg" border="0" height="42" width="820"
           alt="You are using an outdated browser. For a faster, safer browsing experience, upgrade for free today or use other browser ,like chrome firefox safari."
           style='margin-left:auto;margin-right:auto;display: block;'/>
    </a>
  </div>
<![endif]-->
  


<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
            (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
          m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
  ga('create', 'UA-75174040-1', 'auto');
  ga('send', 'pageview');
</script>


  <script type="text/javascript">
    var _hmt = _hmt || [];
    (function() {
      var hm = document.createElement("script");
      hm.src = "//hm.baidu.com/hm.js?5641a55459d47b98c90f424b8ca53a5a";
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(hm, s);
    })();
  </script>




  <div class="container one-column page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-meta ">
  

  <div class="custom-logo-site-title">
    <a href="/"  class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <span class="site-title">Lechance's Blog</span>
      <span class="logo-line-after"><i></i></span>
    </a>
  </div>
  <p class="site-subtitle"></p>
</div>

<div class="site-nav-toggle">
  <button>
    <span class="btn-bar"></span>
    <span class="btn-bar"></span>
    <span class="btn-bar"></span>
  </button>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu ">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-home fa-fw"></i> <br />
            
            Home
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives" rel="section">
            
              <i class="menu-item-icon fa fa-archive fa-fw"></i> <br />
            
            Archives
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags" rel="section">
            
              <i class="menu-item-icon fa fa-tags fa-fw"></i> <br />
            
            Tags
          </a>
        </li>
      
        
        <li class="menu-item menu-item-links">
          <a href="/links" rel="section">
            
              <i class="menu-item-icon fa fa-link fa-fw"></i> <br />
            
            Links
          </a>
        </li>
      
        
        <li class="menu-item menu-item-about">
          <a href="/about" rel="section">
            
              <i class="menu-item-icon fa fa-user fa-fw"></i> <br />
            
            About
          </a>
        </li>
      
        
        <li class="menu-item menu-item-rss">
          <a href="/atom.xml" rel="section">
            
              <i class="menu-item-icon fa fa-rss fa-fw"></i> <br />
            
            Rss
          </a>
        </li>
      

      
      
    </ul>
  

  
</nav>

 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div id="content" class="content">
          

  <div id="posts" class="posts-expand">
    

  
  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                500px api-readme
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            Posted on
            <time itemprop="dateCreated" datetime="2015-08-19T21:26:40+08:00" content="2015-08-19">
              2015-08-19
            </time>
          </span>

          
            <span class="post-category" >
              &nbsp; | &nbsp; In
              
                <span itemprop="about" itemscope itemtype="https://schema.org/Thing">
                  <a href="/categories/Programming/" itemprop="url" rel="index">
                    <span itemprop="name">Programming</span>
                  </a>
                </span>

                
                

              
            </span>
          

          
            
              <span class="post-comments-count">
                &nbsp; | &nbsp;
                <a href="/posts/2015/08/19/400px-api-readme/#comments" itemprop="discussionUrl">
                  <span class="post-comments-count ds-thread-count" data-thread-key="posts/2015/08/19/400px-api-readme/" itemprop="commentsCount"></span>
                </a>
              </span>
            
          

          
		  
		  
			 &nbsp; | &nbsp;
			 <span id="/posts/2015/08/19/400px-api-readme/"class="leancloud_visitors"  data-flag-title="500px api-readme">
             &nbsp;Views
            </span>
		  
		
        </div>
      </header>
    


    <div class="post-body">

      
      

      
        <span itemprop="articleBody"><h1 id="500px_API">500px API</h1><p>500px API provides programmatic access to 500px functionality and content.<br>Version 1 of the API is limited to the essentials of the website’s functionality: viewing feature streams, photo information and comments, as well as user profiles.</p>
<p>The API is <a href="http://en.wikipedia.org/wiki/Representational_State_Transfer" title="RESTful" target="_blank" rel="external">REST API</a><br>and uses <a href="http://oauth.net/" title="OAuth" target="_blank" rel="external">OAuth</a> 1.0a for user authentication purposes.<br>Currently, return format for all endpoints is <a href="http://json.org/" title="JSON" target="_blank" rel="external">JSON</a>.</p>
<p>You can try our API in <a href="http://bitly.com/api500px" target="_blank" rel="external">console</a> (<a href="http://bitly.com/api500px" target="_blank" rel="external">http://bitly.com/api500px</a>)</p>
<p>See <a href="http://status.500px.com" target="_blank" rel="external">status.500px.com</a> for API status updates, outages, and scheduled maintenance.</p>
<hr>
<h2 id="Checklist">Checklist</h2><ul>
<li><a href="http://bitly.com/api500px" target="_blank" rel="external">Try the API console</a></li>
<li><a href="https://github.com/500px/api-documentation#what-do-i-need-to-know-before-i-start-using-the-api" target="_blank" rel="external">See if the concepts used by the API are familiar to you</a></li>
<li>Familiarize yourself with API functionality</li>
<li>Read the 500px <a href="https://github.com/500px/api-documentation/blob/master/basics/terms_of_use.md" target="_blank" rel="external">API Terms of Use</a></li>
<li><a href="http://500px.com/settings/applications" target="_blank" rel="external">Register your application</a> and get OAuth consumer key and secret</li>
<li>Hack away</li>
</ul>
<hr>
<a id="more"></a>
<h2 id="Basics">Basics</h2><ul>
<li><strong><a href="https://github.com/500px/api-documentation/blob/master/basics/formats_and_terms.md" target="_blank" rel="external">Formats and Terms</a></strong></li>
<li><strong><a href="https://github.com/500px/api-documentation/blob/master/basics/terms_of_use.md" target="_blank" rel="external">API Terms of Use</a></strong></li>
</ul>
<h2 id="Examples">Examples</h2><ul>
<li><strong><a href="http://500px.github.com/500px-js-sdk" target="_blank" rel="external">JavaScript</a></strong></li>
<li><strong><a href="https://github.com/500px/api-documentation/blob/master/examples/iOS/API%20Tutorials.md" target="_blank" rel="external">iOS</a></strong></li>
<li><strong><a href="https://github.com/500px/api-documentation/blob/master/examples/Ruby/" target="_blank" rel="external">Ruby</a></strong></li>
<li><strong><a href="https://github.com/500px/api-documentation/blob/master/examples/PHP/PHP.md" target="_blank" rel="external">PHP</a></strong></li>
</ul>
<h2 id="Changes">Changes</h2><ul>
<li>2014-03-27 Deprecated photo object’s image_url key.</li>
</ul>
<h2 id="SDK">SDK</h2><ul>
<li><strong><a href="https://github.com/500px/500px-js-sdk" target="_blank" rel="external">JavaScript</a></strong></li>
<li><strong><a href="https://github.com/500px/500px-android-sdk" target="_blank" rel="external">Android</a></strong></li>
<li><strong><a href="https://github.com/500px/500px-iOS-api" target="_blank" rel="external">iOS</a></strong></li>
</ul>
<h2 id="Endpoints">Endpoints</h2><h4 id="Photo_Resources">Photo Resources</h4><ul>
<li><strong><a href="https://github.com/500px/api-documentation/blob/master/endpoints/photo/GET_photos.md" target="_blank" rel="external"><code>GET</code> photos</a></strong></li>
<li><strong><a href="https://github.com/500px/api-documentation/blob/master/endpoints/photo/GET_photos_search.md" target="_blank" rel="external"><code>GET</code> photos/search</a></strong></li>
<li><strong><a href="https://github.com/500px/api-documentation/blob/master/endpoints/photo/GET_photos_id.md" target="_blank" rel="external"><code>GET</code> photos/:id</a></strong></li>
<li><strong><a href="https://github.com/500px/api-documentation/blob/master/endpoints/photo/GET_photos_id_comments.md" target="_blank" rel="external"><code>GET</code> photos/:id/comments</a></strong></li>
<li><strong><a href="https://github.com/500px/api-documentation/blob/master/endpoints/photo/GET_photos_id_votes.md" target="_blank" rel="external"><code>GET</code> photos/:id/votes</a></strong></li>
<li><strong><a href="https://github.com/500px/api-documentation/blob/master/endpoints/photo/PUT_photos_id.md" target="_blank" rel="external"><code>PUT</code> photos/:id</a></strong></li>
<li><strong><a href="https://github.com/500px/api-documentation/blob/master/endpoints/photo/POST_photos.md" target="_blank" rel="external"><code>POST</code> photos</a></strong></li>
<li><strong><a href="https://github.com/500px/api-documentation/blob/master/endpoints/photo/POST_photos_upload.md" target="_blank" rel="external"><code>POST</code> photos/upload</a></strong></li>
<li><strong><a href="https://github.com/500px/api-documentation/blob/master/endpoints/photo/POST_photos_id_vote.md" target="_blank" rel="external"><code>POST</code> photos/:id/vote</a></strong></li>
<li><strong><a href="https://github.com/500px/api-documentation/blob/master/endpoints/photo/DELETE_photos_id_vote.md" target="_blank" rel="external"><code>DELETE</code> photos/:id/vote</a></strong></li>
<li><strong><a href="https://github.com/500px/api-documentation/blob/master/endpoints/photo/POST_photos_id_tags.md" target="_blank" rel="external"><code>POST</code> photos/:id/tags</a></strong></li>
<li><strong><a href="https://github.com/500px/api-documentation/blob/master/endpoints/photo/POST_photos_id_comments.md" target="_blank" rel="external"><code>POST</code> photos/:id/comments</a></strong></li>
<li><strong><a href="https://github.com/500px/api-documentation/blob/master/endpoints/photo/POST_photos_id_report.md" target="_blank" rel="external"><code>POST</code> photos/:id/report</a></strong></li>
<li><strong><a href="https://github.com/500px/api-documentation/blob/master/endpoints/photo/DELETE_photos_id.md" target="_blank" rel="external"><code>DELETE</code> photos/:id</a></strong></li>
<li><strong><a href="https://github.com/500px/api-documentation/blob/master/endpoints/photo/DELETE_photos_id_tags.md" target="_blank" rel="external"><code>DELETE</code> photos/:id/tags</a></strong></li>
</ul>
<h4 id="Upload_Method">Upload Method</h4><ul>
<li><strong><a href="https://github.com/500px/api-documentation/blob/master/endpoints/upload/POST_upload.md" target="_blank" rel="external"><code>POST</code> upload</a></strong></li>
</ul>
<h4 id="User_Resources">User Resources</h4><ul>
<li><strong><a href="https://github.com/500px/api-documentation/blob/master/endpoints/user/GET_users.md" target="_blank" rel="external"><code>GET</code> users</a></strong></li>
<li><strong><a href="https://github.com/500px/api-documentation/blob/master/endpoints/user/GET_users_show.md" target="_blank" rel="external"><code>GET</code> users/show</a></strong></li>
<li><strong><a href="https://github.com/500px/api-documentation/blob/master/endpoints/user/GET_users_id_friends.md" target="_blank" rel="external"><code>GET</code> users/:id/friends</a></strong></li>
<li><strong><a href="https://github.com/500px/api-documentation/blob/master/endpoints/user/GET_users_id_followers.md" target="_blank" rel="external"><code>GET</code> users/:id/followers</a></strong></li>
<li><strong><a href="https://github.com/500px/api-documentation/blob/master/endpoints/user/GET_users_search.md" target="_blank" rel="external"><code>GET</code> users/search</a></strong></li>
<li><strong><a href="https://github.com/500px/api-documentation/blob/master/endpoints/user/POST_users_id_friends.md" target="_blank" rel="external"><code>POST</code> users/:id/friends</a></strong></li>
<li><strong><a href="https://github.com/500px/api-documentation/blob/master/endpoints/user/DELETE_users_id_friends.md" target="_blank" rel="external"><code>DELETE</code> users/:id/friends</a></strong></li>
</ul>
<h4 id="Gallery_Resources">Gallery Resources</h4><ul>
<li><strong><a href="https://github.com/500px/api-documentation/blob/master/endpoints/galleries/GET_galleries.md" target="_blank" rel="external"><code>GET</code> users/:user_id/galleries</a></strong></li>
<li><strong><a href="https://github.com/500px/api-documentation/blob/master/endpoints/galleries/GET_galleries_id.md" target="_blank" rel="external"><code>GET</code> users/:user_id/galleries/:id</a></strong></li>
<li><strong><a href="https://github.com/500px/api-documentation/blob/master/endpoints/galleries/GET_galleries_id_items.md" target="_blank" rel="external"><code>GET</code> users/:user_id/galleries/:id/items</a></strong></li>
<li><strong><a href="https://github.com/500px/api-documentation/blob/master/endpoints/galleries/GET_galleries_id.md" target="_blank" rel="external"><code>GET</code> users/:user_id/galleries/:id/share_url</a></strong></li>
<li><strong><a href="https://github.com/500px/api-documentation/blob/master/endpoints/galleries/PUT_galleries_id.md" target="_blank" rel="external"><code>PUT</code> users/:user_id/galleries/:id</a></strong></li>
<li><strong><a href="https://github.com/500px/api-documentation/blob/master/endpoints/galleries/PUT_galleries_id_items.md" target="_blank" rel="external"><code>PUT</code> users/:user_id/galleries/:id/items</a></strong></li>
<li><strong><a href="https://github.com/500px/api-documentation/blob/master/endpoints/galleries/PUT_galleries_reposition.md" target="_blank" rel="external"><code>PUT</code> users/:user_id/galleries/reposition</a></strong></li>
<li><strong><a href="https://github.com/500px/api-documentation/blob/master/endpoints/galleries/POST_galleries.md" target="_blank" rel="external"><code>POST</code> users/:user_id/galleries</a></strong></li>
<li><strong><a href="https://github.com/500px/api-documentation/blob/master/endpoints/galleries/DELETE_galleries_id.md" target="_blank" rel="external"><code>DELETE</code> users/:user_id/galleries/:id</a></strong></li>
</ul>
<h4 id="Collections/Sets_Resources">Collections/Sets Resources</h4><ul>
<li><strong>DEPRECATED</strong>.  Please use <a href="#gallery-resources">Gallery Resources</a> instead</li>
</ul>
<h4 id="Comment_Resources">Comment Resources</h4><ul>
<li><strong><a href="https://github.com/500px/api-documentation/blob/master/endpoints/comments/POST_comments_id_comments.md" target="_blank" rel="external"><code>POST</code> comments/:id/comments</a></strong></li>
</ul>
<h2 id="Authentication">Authentication</h2><ul>
<li><strong><a href="https://github.com/500px/api-documentation/blob/master/authentication/POST_oauth_requesttoken.md" target="_blank" rel="external"><code>POST</code> oauth/request_token</a></strong></li>
<li><strong><a href="https://github.com/500px/api-documentation/blob/master/authentication/POST_oauth_authorize.md" target="_blank" rel="external"><code>POST</code> oauth/authorize</a></strong></li>
<li><strong><a href="https://github.com/500px/api-documentation/blob/master/authentication/POST_oauth_accesstoken.md" target="_blank" rel="external"><code>POST</code> oauth/access_token</a></strong></li>
<li><strong><a href="https://github.com/500px/api-documentation/blob/master/authentication/upload_key.md" target="_blank" rel="external">Upload key</a></strong></li>
</ul>
<h2 id="FAQ">FAQ</h2><h3 id="What_do_I_need_to_know_before_I_start_using_the_API?">What do I need to know before I start using the API?</h3><p>Got rust on your skills? No worries. Here are the docs you might need to get started:</p>
<ul>
<li>HTTPS protocol</li>
<li><a href="http://en.wikipedia.org/wiki/Representational_State_Transfer" target="_blank" rel="external">REST software pattern</a></li>
<li>Authentication with <a href="http://oauth.net/core/1.0a/" target="_blank" rel="external">OAuth</a> (or the official <a href="http://hueniverse.com/oauth/" target="_blank" rel="external">Beginner’s Guide</a>)</li>
<li>Data serialization with <a href="http://json.org" target="_blank" rel="external">JSON</a> (or see a <a href="http://www.webmonkey.com/2010/02/get_started_with_json/" target="_blank" rel="external">quick tutorial</a>)</li>
</ul>
<h3 id="How_do_I_connect_to_the_500px-com_API?">How do I connect to the 500px.com API?</h3><p>The API is only available to authenticated clients. Clients should authenticate users using <a href="http://oauth.net/core/1.0a/" target="_blank" rel="external">OAuth</a>. Once authenticated, you need to request a resource from one of the endpoints using HTTPS. Generally, reading any data is done through a request with GET method. If you want our server to create, update or delete a given resource, POST or PUT methods are required.</p>
<h3 id="What_return_formats_do_you_support?">What return formats do you support?</h3><p>500px API currently returns data in <a href="http://json.org/" title="JSON" target="_blank" rel="external">JSON</a> format.</p>
<h3 id="What_kind_of_authentication_is_required?">What kind of authentication is required?</h3><p>Applications must identify themselves to access any resource.<br>If your application only needs read-only access and does not authenticate the user, <strong>consumer_key</strong> containing a valid Consumer Key parameter should be specified in the query string. Otherwise, <a href="https://github.com/500px/api-documentation/tree/master/authentication" target="_blank" rel="external">OAuth</a> or upload key authentication takes care of identifying the application as well as the user accessing the API.</p>
<h3 id="Is_there_a_request_rate_limit?">Is there a request rate limit?</h3><p>There is a rate limit of 1,000,000 API requests per month per account. We will contact you and if required disable your application if we find that your application is exceeding this limit or interfering with our system’s stability.This revised rate limit will come into effect May 1, 2014.</p>
</span>
      
    </div>

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/500xp/" rel="tag">#500xp</a>
          
        </div>
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/posts/2015/06/28/markdown-overview/" rel="next" title="Markdown">
                <i class="fa fa-chevron-left"></i> Markdown
              </a>
            
          </div>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/posts/2015/11/10/copy-paste-cut-for-vim/" rel="prev" title="Copy Paste Cut for Vim">
                Copy Paste Cut for Vim <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </article>



    <div class="post-spread">
      
        <div class="ds-share flat" data-thread-key="posts/2015/08/19/400px-api-readme/"
     data-title="500px api-readme"
     data-content=""
     data-url="https://lechance.github.io/posts/2015/08/19/400px-api-readme/">
  <div class="ds-share-inline">
    <ul  class="ds-share-icons-16">

      <li data-toggle="ds-share-icons-more"><a class="ds-more" href="javascript:void(0);">分享到：</a></li>
      <li><a class="ds-weibo" href="javascript:void(0);" data-service="weibo">微博</a></li>
      <li><a class="ds-qzone" href="javascript:void(0);" data-service="qzone">QQ空间</a></li>
      <li><a class="ds-qqt" href="javascript:void(0);" data-service="qqt">腾讯微博</a></li>
      <li><a class="ds-wechat" href="javascript:void(0);" data-service="wechat">微信</a></li>

    </ul>
    <div class="ds-share-icons-more">
    </div>
  </div>
</div>
      
    </div>
  </div>


        </div>

        


        
  <div class="comments" id="comments">
    
      <div class="ds-thread" data-thread-key="posts/2015/08/19/400px-api-readme/"
           data-title="500px api-readme" data-url="https://lechance.github.io/posts/2015/08/19/400px-api-readme/">
      </div>
    
  </div>


      </div>

      
        
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap" >
            Table Of Contents
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview">
            Overview
          </li>
        </ul>
      

      <section class="site-overview sidebar-panel ">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
          <img class="site-author-image" src="/upload/image/avatar.png" alt="Lechance Cheung" itemprop="image"/>
          <p class="site-author-name" itemprop="name">Lechance Cheung</p>
        </div>
        <p class="site-description motion-element" itemprop="description">The code to change the world</p>
        <nav class="site-state motion-element">
          <div class="site-state-item site-state-posts">
            <a href="/archives">
              <span class="site-state-item-count">43</span>
              <span class="site-state-item-name">posts</span>
            </a>
          </div>

          <div class="site-state-item site-state-categories">
            
              <span class="site-state-item-count">15</span>
              <span class="site-state-item-name">categories</span>
              
          </div>

          <div class="site-state-item site-state-tags">
            <a href="/tags">
              <span class="site-state-item-count">66</span>
              <span class="site-state-item-name">tags</span>
              </a>
          </div>

        </nav>

        

        <div class="links-of-author motion-element">
          
            
              <span class="links-of-author-item">
                <a href="http://weibo.com/lechance" target="_blank">
                  
                    <i class="fa fa-weibo"></i> Weibo
                  
                </a>
              </span>
            
              <span class="links-of-author-item">
                <a href="https://github.com/lechance" target="_blank">
                  
                    <i class="fa fa-globe"></i> Github
                  
                </a>
              </span>
            
              <span class="links-of-author-item">
                <a href="https://guides.github.com/features/mastering-markdown/" target="_blank">
                  
                    <i class="fa fa-globe"></i> MD CheatSheet
                  
                </a>
              </span>
            
          
        </div>

        
        
          <div class="cc-license motion-element" itemprop="license">
            <a href="http://creativecommons.org/licenses/by-nc-sa/4.0" class="cc-opacity" target="_blank">
              <img src="/images/cc-by-nc-sa.svg" alt="Creative Commons" />
            </a>
          </div>
        

        <div class="links-of-author motion-element">
          
            <p class="site-author-name">Common Sites</p>
            
              <span class="links-of-author-item">
                <a href="https://developers.google.cn" target="_blank">Google Developers</a>
              </span>
            
              <span class="links-of-author-item">
                <a href="http://androidweekly.net/archive" target="_blank">Android Weekly</a>
              </span>
            
              <span class="links-of-author-item">
                <a href="https://rxjava.yuxingxin.com" target="_blank">RxJava Essentials</a>
              </span>
            
              <span class="links-of-author-item">
                <a href="https://hc.apache.org/index.html" target="_blank">Http Components</a>
              </span>
            
              <span class="links-of-author-item">
                <a href="http://simpledeveloper.com" target="_blank">Simple Developer</a>
              </span>
            
              <span class="links-of-author-item">
                <a href="https://www.ibm.com/developerworks/library" target="_blank">IBM(Technical Library)</a>
              </span>
            
          
        </div>

      </section>

      
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc-indicator-top post-toc-indicator">
            <i class="fa fa-angle-double-up"></i>
          </div>
          <div class="post-toc">
            
              
            
            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#500px_API"><span class="nav-number">1.</span> <span class="nav-text">500px API</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#Checklist"><span class="nav-number">1.1.</span> <span class="nav-text">Checklist</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Basics"><span class="nav-number">1.2.</span> <span class="nav-text">Basics</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Examples"><span class="nav-number">1.3.</span> <span class="nav-text">Examples</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Changes"><span class="nav-number">1.4.</span> <span class="nav-text">Changes</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#SDK"><span class="nav-number">1.5.</span> <span class="nav-text">SDK</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Endpoints"><span class="nav-number">1.6.</span> <span class="nav-text">Endpoints</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#Photo_Resources"><span class="nav-number">1.6.0.1.</span> <span class="nav-text">Photo Resources</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#Upload_Method"><span class="nav-number">1.6.0.2.</span> <span class="nav-text">Upload Method</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#User_Resources"><span class="nav-number">1.6.0.3.</span> <span class="nav-text">User Resources</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#Gallery_Resources"><span class="nav-number">1.6.0.4.</span> <span class="nav-text">Gallery Resources</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#Collections/Sets_Resources"><span class="nav-number">1.6.0.5.</span> <span class="nav-text">Collections/Sets Resources</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#Comment_Resources"><span class="nav-number">1.6.0.6.</span> <span class="nav-text">Comment Resources</span></a></li></ol></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Authentication"><span class="nav-number">1.7.</span> <span class="nav-text">Authentication</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#FAQ"><span class="nav-number">1.8.</span> <span class="nav-text">FAQ</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#What_do_I_need_to_know_before_I_start_using_the_API?"><span class="nav-number">1.8.1.</span> <span class="nav-text">What do I need to know before I start using the API?</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#How_do_I_connect_to_the_500px-com_API?"><span class="nav-number">1.8.2.</span> <span class="nav-text">How do I connect to the 500px.com API?</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#What_return_formats_do_you_support?"><span class="nav-number">1.8.3.</span> <span class="nav-text">What return formats do you support?</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#What_kind_of_authentication_is_required?"><span class="nav-number">1.8.4.</span> <span class="nav-text">What kind of authentication is required?</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#Is_there_a_request_rate_limit?"><span class="nav-number">1.8.5.</span> <span class="nav-text">Is there a request rate limit?</span></a></li></ol></li></ol></li></ol></div>
            
          </div>
          <div class="post-toc-indicator-bottom post-toc-indicator">
            <i class="fa fa-angle-double-down"></i>
          </div>
        </section>
      

    </div>
  </aside>


      
    </main>

    <footer id="footer" class="footer">
      <div class="google-ad">
	  <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- myblogfootergooglead -->
<ins class="adsbygoogle"
     style="display:inline-block;width:468px;height:60px"
     data-ad-client="ca-pub-6226577131784709"
     data-ad-slot="6824128270"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

      </div>
      <div class="footer-inner">
        <script async src="https://dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js">
</script>

<div class="copyright" >
  
  &copy;  2015 - 
  <span itemprop="copyrightYear">2017</span>
  <span class="with-love">
    <i class="icon-next-heart fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Lechance Cheung</span>
</div>

<div class="powered-by">
  Powered by <a class="theme-link" href="http://hexo.io">Hexo</a>
</div>

<div class="theme-info">
  Theme -
  <a class="theme-link" href="https://github.com/iissnan/hexo-theme-next">
    NexT
  </a>
</div>

<span id="busuanzi_container_site_pv">
  &nbsp; | &nbsp;PV <span id="busuanzi_value_site_pv"></span> &nbsp;| &nbsp;UV <span id="busuanzi_value_site_uv"></span>
</span>



      </div>
    </footer>

    <div class="back-to-top"></div>
  </div>

  <script type="text/javascript" src="/vendors/jquery/index.js?v=2.1.3"></script>

  
  

  
    

  
    
  

  <script type="text/javascript">
    var duoshuoQuery = {short_name:"lechance"};
    (function() {
      var ds = document.createElement('script');
      ds.type = 'text/javascript';ds.async = true;
      ds.id = 'duoshuo-script';
      ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//lechance.github.io/embed_ua.js';
      ds.charset = 'UTF-8';
      (document.getElementsByTagName('head')[0]
      || document.getElementsByTagName('body')[0]).appendChild(ds);
    })();
  </script>
    
     


    
  

  
  <script type="text/javascript" src="/vendors/fancybox/source/jquery.fancybox.pack.js"></script>
  <script type="text/javascript" src="/js/fancy-box.js?v=0.4.5.2"></script>


  <script type="text/javascript" src="/js/helpers.js?v=0.4.5.2"></script>
  <script type="text/javascript" src="/vendors/velocity/velocity.min.js"></script>
<script type="text/javascript" src="/vendors/velocity/velocity.ui.min.js"></script>

<script type="text/javascript" src="/js/motion.js?v=0.4.5.2" id="motion.global"></script>


  <script type="text/javascript" src="/vendors/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  <script type="text/javascript" src="/vendors/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>

  
  
<script type="text/javascript" src="/js/bootstrap.scrollspy.js?v=0.4.5.2" id="bootstrap.scrollspy.custom"></script>


<script type="text/javascript" id="sidebar.toc.highlight">
  $(document).ready(function () {
    var tocSelector = '.post-toc';
    var $tocSelector = $(tocSelector);
    var activeCurrentSelector = '.active-current';

    $tocSelector
      .on('activate.bs.scrollspy', function () {
        var $currentActiveElement = $(tocSelector + ' .active').last();

        removeCurrentActiveClass();
        $currentActiveElement.addClass('active-current');

        $tocSelector[0].scrollTop = $currentActiveElement.position().top;
      })
      .on('clear.bs.scrollspy', function () {
        removeCurrentActiveClass();
      });

    function removeCurrentActiveClass () {
      $(tocSelector + ' ' + activeCurrentSelector)
        .removeClass(activeCurrentSelector.substring(1));
    }

    function processTOC () {
      getTOCMaxHeight();
      toggleTOCOverflowIndicators();
    }

    function getTOCMaxHeight () {
      var height = $('.sidebar').height() -
                   $tocSelector.position().top -
                   $('.post-toc-indicator-bottom').height();

      $tocSelector.css('height', height);

      return height;
    }

    function toggleTOCOverflowIndicators () {
      tocOverflowIndicator(
        '.post-toc-indicator-top',
        $tocSelector.scrollTop() > 0 ? 'show' : 'hide'
      );

      tocOverflowIndicator(
        '.post-toc-indicator-bottom',
        $tocSelector.scrollTop() >= $tocSelector.find('ol').height() - $tocSelector.height() ? 'hide' : 'show'
      )
    }

    $(document).on('sidebar.motion.complete', function () {
      processTOC();
    });

    $('body').scrollspy({ target: tocSelector });
    $(window).on('resize', function () {
      if ( $('.sidebar').hasClass('sidebar-active') ) {
        processTOC();
      }
    });

    onScroll($tocSelector);

    function onScroll (element) {
      element.on('mousewheel DOMMouseScroll', function (event) {
          var oe = event.originalEvent;
          var delta = oe.wheelDelta || -oe.detail;

          this.scrollTop += ( delta < 0 ? 1 : -1 ) * 30;
          event.preventDefault();

          toggleTOCOverflowIndicators();
      });
    }

    function tocOverflowIndicator (indicator, action) {
      var $indicator = $(indicator);
      var opacity = action === 'show' ? 1 : 0;
      $indicator.velocity ?
        $indicator.velocity('stop').velocity({
          opacity: opacity
        }, { duration: 100 }) :
        $indicator.stop().animate({
          opacity: opacity
        }, 100);
    }

  });
</script>

<script type="text/javascript" id="sidebar.nav">
  $(document).ready(function () {
    var html = $('html');
    var TAB_ANIMATE_DURATION = 200;
    var hasVelocity = $.isFunction(html.velocity);

    $('.sidebar-nav li').on('click', function () {
      var item = $(this);
      var activeTabClassName = 'sidebar-nav-active';
      var activePanelClassName = 'sidebar-panel-active';
      if (item.hasClass(activeTabClassName)) {
        return;
      }

      var currentTarget = $('.' + activePanelClassName);
      var target = $('.' + item.data('target'));

      hasVelocity ?
        currentTarget.velocity('transition.slideUpOut', TAB_ANIMATE_DURATION, function () {
          target
            .velocity('stop')
            .velocity('transition.slideDownIn', TAB_ANIMATE_DURATION)
            .addClass(activePanelClassName);
        }) :
        currentTarget.animate({ opacity: 0 }, TAB_ANIMATE_DURATION, function () {
          currentTarget.hide();
          target
            .stop()
            .css({'opacity': 0, 'display': 'block'})
            .animate({ opacity: 1 }, TAB_ANIMATE_DURATION, function () {
              currentTarget.removeClass(activePanelClassName);
              target.addClass(activePanelClassName);
            });
        });

      item.siblings().removeClass(activeTabClassName);
      item.addClass(activeTabClassName);
    });

    $('.post-toc a').on('click', function (e) {
      e.preventDefault();
      var targetSelector = escapeSelector(this.getAttribute('href'));
      var offset = $(targetSelector).offset().top;
      hasVelocity ?
        html.velocity('stop').velocity('scroll', {
          offset: offset  + 'px',
          mobileHA: false
        }) :
        $('html, body').stop().animate({
          scrollTop: offset
        }, 500);
    });

    // Expand sidebar on post detail page by default, when post has a toc.
    motionMiddleWares.sidebar = function () {
      var $tocContent = $('.post-toc-content');
      if (CONFIG.sidebar === 'post') {
        if ($tocContent.length > 0 && $tocContent.html().trim().length > 0) {
          displaySidebar();
        }
      }
    };
  });
</script>



  <script type="text/javascript" src="/js/bootstrap.js"></script>

  
  

  
  
  
  
  	 <!-- custom analytics part create by xiamo -->
<script src="https://cdn1.lncld.net/static/js/av-core-mini-0.6.1.js"></script>
<script>AV.initialize("cHqcCBDQtcbkltuUTyplEYWJ-gzGzoHsz", "SkioJGixXR48ACpgA0W2lOWd");</script>
<script>
function showTime(Counter) {
	var query = new AV.Query(Counter);
	$(".leancloud_visitors").each(function() {
		var url = $(this).attr("id").trim();
		query.equalTo("url", url);
		query.find({
			success: function(results) {
				if (results.length == 0) {
					var content = '0 ' + $(document.getElementById(url)).text();
					$(document.getElementById(url)).text(content);
					return;
				}
				for (var i = 0; i < results.length; i++) {
					var object = results[i];
					var content = object.get('time') + ' ' + $(document.getElementById(url)).text();
					$(document.getElementById(url)).text(content);
				}
			},
			error: function(object, error) {
				console.log("Error: " + error.code + " " + error.message);
			}
		});

	});
}

function addCount(Counter) {
	var Counter = AV.Object.extend("Counter");
	url = $(".leancloud_visitors").attr('id').trim();
	title = $(".leancloud_visitors").attr('data-flag-title').trim();
	var query = new AV.Query(Counter);
	query.equalTo("url", url);
	query.find({
		success: function(results) {
			if (results.length > 0) {
				var counter = results[0];
				counter.fetchWhenSave(true);
				counter.increment("time");
				counter.save(null, {
					success: function(counter) {
						var content =  counter.get('time') + ' ' + $(document.getElementById(url)).text();
						$(document.getElementById(url)).text(content);
					},
					error: function(counter, error) {
						console.log('Failed to save Visitor num, with error message: ' + error.message);
					}
				});
			} else {
				var newcounter = new Counter();
				newcounter.set("title", title);
				newcounter.set("url", url);
				newcounter.set("time", 1);
				newcounter.save(null, {
					success: function(newcounter) {
					    console.log("newcounter.get('time')="+newcounter.get('time'));
						var content = newcounter.get('time') + ' ' + $(document.getElementById(url)).text();
						$(document.getElementById(url)).text(content);
					},
					error: function(newcounter, error) {
						console.log('Failed to create');
					}
				});
			}
		},
		error: function(error) {
			console.log('Error:' + error.code + " " + error.message);
		}
	});
}
$(function() {
	var Counter = AV.Object.extend("Counter");
	if ($('.leancloud_visitors').length == 1) {
		addCount(Counter);
	} else if ($('.post-title-link').length > 1) {
		showTime(Counter);
	}
}); 
</script>
  
  
<!-- mathjax config similar to math.stackexchange -->

<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    tex2jax: {
      inlineMath: [ ['$','$'], ["\\(","\\)"] ],
      processEscapes: true
    }
  });
</script>

<script type="text/x-mathjax-config">
    MathJax.Hub.Config({
      tex2jax: {
        skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
      }
    });
</script>

<script type="text/x-mathjax-config">
    MathJax.Hub.Queue(function() {
        var all = MathJax.Hub.getAllJax(), i;
        for(i=0; i < all.length; i += 1) {
            all[i].SourceElement().parentNode.className += ' has-jax';
        }
    });
</script>

<script type="text/javascript" src="//cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
</body>
</html>
